scripty2

class S2.FX.Queue

Description

Effect queues manage the execution of effects in parallel or end-to-end over time.

Instance methods

  • active #

    S2.FX.Queue#active() -> Boolean

    Returns whether there are any effects currently running or queued up.

  • add #

    S2.FX.Queue#add(effect) -> S2.FX.Queue

    Add an effect to the queue. The effects' options can optionally contain a position option that can be either parallel (the effect will start immediately) or end (the effect will start when the last of the currently queued effects end). Returns the Queue.

    fires: effect:queued

  • getEffects #

    S2.FX.Queue#getEffects() -> Array

    Returns an array of any effects currently running or queued up.

  • remove #

    S2.FX.Queue#remove(effect) -> S2.FX.Queue
    • effect (S2.FX.Base) – Effect to be removed from the Queue.

    Removes an effect from the Queue and destroys the effect. Returns the Queue.

    fires: effect:dequeued

  • render #

    S2.FX.Queue#render(timestamp) -> S2.FX.Queue
    • timestamp (Date) – Timestamp given to the individual effects' render methods.

    Renders all effects that are currently in the Queue. Returns the Queue.